//
//  NoticeViewController.m
//  NiuNiuPacking
//
//  Created by Bass on 14-10-20.
//  Copyright (c) 2014年 Reseek. All rights reserved.
//
#define noticeURL @"http://api.niuniuparking.com/api/v1/p_getnotice"

#import "NoticeViewController.h"
#import "NSString+SBJSON.h"
#import "ASIFormDataRequest.h"

@interface NoticeViewController ()

@end

@implementation NoticeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    ASIFormDataRequest *requestForm = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:noticeURL]];
    requestForm.delegate = self;
    [requestForm setPostValue:@"d2b19008fe33b9480d423217d492c941" forKey:@"token"];
    
    [requestForm startSynchronous];
    
    self.notice.text = requestForm.responseString;
}

- (void)requestFailed:(ASIHTTPRequest *)request
{
    NSLog(@"请求失败");
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)dealloc {
    [_notice release];
    [super dealloc];
}
@end
